package com.qiaoas.springbootconfig2;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class indexController {

    @Autowired
    private UserConfig userConfig;

    @RequestMapping("/")
    String index(){
        return "Hello Spring Boot Config 2";
    }

    @RequestMapping("getuser")
    String getUser(){
        return userConfig.getName() + " 333 " + userConfig.getAge();
    }
}
